package common

type App_Config_Data struct {
	Debug struct {
		IsDebugMode bool `default:"false" env:"IsDebugMode"`
	}

	Database struct {
		Master_Db string `required:"true"`
	}

	/*DB struct {
		Name     string
		User     string `default:"root"`
		Password string `required:"true" env:"DBPassword"`
		Port     uint   `default:"3306"`
	}*/

	/*Contacts []struct {
		Name  string
		Email string `required:"true"`
	}*/

	Http struct {
		Port   int    `required:"true"`
		Domain string `required:"true"`
	}

	Session struct {
		If_Redis_session bool `default:"false"`
	}

	Redis struct {
		Redis_Host string `required:"true"`
		Redis_Port string `required:"true"`
		Redis_Pswd string
	}

	Aliyun_Oss struct {
		Key_Id     string
		Key_Secret string
		Endpoint   string
		Endpoint_Internal string
		Bucket     string
	}

	Code struct {
		Prjname         string `required:"true"`
		Prjprex         bool   `default:"false"`
		Req_SignKey     string `required:"true"`
		Token_SecretKey string `required:"true"`
	}

	Attr struct {
		Is_TenantApp bool `default:"false"`
		User_Mini_App_Id int64
	}

	Wechat struct {
		// 小程序
		WX_APPID     string
		WX_APPSECRET string

		// 公众号
		WX_MP_APPID          string
		WX_MP_APPSECRET      string
		WX_MP_TOKEN          string
		WX_MP_ENCODED_AESKey string

		WX_MERCHANT_ID string
		WX_PAY_KEY     string

		WX_PAYMENT_CERT string
		WX_PAYMENT_KEY  string
		WX_PAYMENT_ROOT string
		WX_PAY_NOTIFY_URL string

		//商户V3配置
		WX_MCH_V3 struct {
			WX_PAY_API_V3_KEY string
			WX_MCH_V3_CERT_SERIAL_NO string //API证书序列号
			WX_MCH_V3_PRI_KEY_CERT string //商户证书（私钥）
		}


	}
}

type AppConfig struct {
	APPName            string `default:"app name"`
	AppVersion         string `default:"0"`
	Parent_Mini_App_Id int64

	AppBrief string
	Who      struct {
		Tenant_Id   int64
		Mini_App_Id int64
		Uid         int64
	}

	App_Config_Data App_Config_Data

}
